/**
 * Created by chenweicheng on 1/3/2017.
 */
/**
 * Created by Administrator on 2016/12/20 0020.
 */

import React, {Component} from 'react';
import {AppRegistry, View, Text, ScrollView, Image, StyleSheet, TouchableHighlight} from 'react-native';
import ShareManager from '../ShareManager';

export default class TestShareManager extends Component {

    constructor(props) {
        super(props)
        this.state = {requetResult: ''}
    }

    _sharePicToMoment(path) {
        ShareManager.sharePic(path).then(() => {
            console.log('share success')
        }, (error) => {
            console.log('share fail', error)
        });
    }

    render() {
        return (
            <View style={styles.container}>
                <TouchableHighlight style={{padding: 20, backgroundColor: '#ccc'}}
                                    onPress={() =>this._sharePicToMoment("/storage/emulated/0/1488360505147.JPEG")  }>
                    <Text>SharePicToMoment</Text>
                </TouchableHighlight>


            </View>
        );
    }
}
var styles = StyleSheet.create({
    container: {
        //   justifyContent: 'center',
        flex: 1,
        flexDirection: 'column',//没有flexDirection这个属性的话，justifyContent不会生效
        justifyContent: 'center',
        padding: 15,
        alignItems: 'center'
    }
});
AppRegistry.registerComponent('TestShareManager', () => TestShareManager);